import Vue from 'vue'
import VueRouter from 'vue-router'
// import Home from '../views/Home.vue'
import information from "../views/information"
import product from "../views/product"
import gallery from "../views/gallery"
import datum from "../views/datum"
import inforDateView from "../views/data-view/inforDateView"
import galDateView from "../views/data-view/galDateView"
import index from "../layout/index"
import ProductView from "../views/data-view/ProductView"
import ProductVideo from '../views/data-view/ProductVideo'
Vue.use(VueRouter)

const routes = [
  {
    path: '/',
    name: 'index',
    component: index,
    redirect:"information",
    children:[
      {
        path:"/information",
        component:information
      },
        // 查看资料信息
      {
        path: "/inforDateView",
        component:inforDateView
      },

      // 查看图册管理
      {
        path: "/galDateView",
        component:galDateView
      },

      {
        path: "/product",
        component: product
      },{
        path: "/gallery",
        component:gallery
      },{
        path: "/datum",
        component: datum
      }
      ,
      // 查看产品资料
      {
        path:"/ProductView",
        component:ProductView
      }
      ,{
        path:'/ProductVideo',
        component:ProductVideo
      }
    ]
  },
  // {
    // path: '/about',
    // name: 'About',
    // // route level code-splitting
    // // this generates a separate chunk (about.[hash].js) for this route
    // // which is lazy-loaded when the route is visited.
    // component: () => import(/* webpackChunkName: "about" */ '../views/About.vue')
  // }
]

const router = new VueRouter({
  mode: 'history',
  base: process.env.BASE_URL,
  routes
})

export default router

